{extend name="public/base"}

{block name="title"}
待结算金额
{/block}

{block name="style"}
{css href="/static/wechat/css/wallet.css" /}
<style>
    .weui-form-preview__label {
        width:55%;
        text-align: left;
    }
</style>
{/block}

{block name="body"}
<div class="pageControl tradeList">
    <div class="msui_nav msui_navTop">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">待结算金额</h1>
    </div>
</div>
{/block}
{block name="javascript"}
<script>
    $(function () {
        var obj = {
            'is_more' : true,
            'page' : 1
        };
        get_order_list(obj.page);
        $(window).scroll( function() {
            if (($(document).height() - $(this).scrollTop() - $(this).height()<50) && obj.is_more){
                get_order_list();
            }
        });

        function get_order_list() {
            obj.is_more = false;
            $.ajax({
                type : 'GET',
                url : '?type=1&page=' + obj.page,
                dataType : 'json',
                success : function (msg) {
                    $(".tradeList").append(msg.tpl);

                    // 计算是否还有更多数据
                    if ((msg.data.total - (msg.data.current_page * msg.data.per_page)) > 0) {
                        obj.is_more = true;
                    }
                    obj.page++;
                }
            });
        }
    });


</script>
{/block}
